<ion-view view-title="客服聊天" class="chat">

	<ion-content style="bottom:80px;" delegate-handle="main-content">
		<!--描述：下拉刷新-->
		<ion-refresher pulling-text="下拉更多记录..."  on-refresh="doRefresh()"></ion-refresher>
		<!--描述：聊天列表-->
		<div class="list-msg" id="cdef">
			<div class="msg-item" ng-repeat="chat in show_message" ng-class="chat.memberId==user_id?'self':'other'">
				<p class="font-small-my text-center" ng-if="chat.type!='S'">{{chat.sendTime}}</p>
				<p class="font-small-my " ng-if="chat.memberId!=user_id&&chat.type!='S'">{{chat.nickName}}</p>
				<div class="logo" ng-if="chat.type!='S'"><img src="{{member_logo[chat.memberId].image_logo}}" /></div>
				<div class="msg-content" ng-if="chat.hongbao==undefined&&chat.type!='S'">
					<div class="msg-content-inner" ng-if="chat.type=='U' || chat.type=='P'">
						<img ng-if="chat.type=='P'" src="{{chat.url}}">
						<span class="emoji" ng-if="chat.type=='U'" ng-bind-html="chat.content"></span>
					</div>
				</div>
			</div>
		</div>
	</ion-content>
	
	<!--表情-->
	<div class="biaoqing" ng-class="biaoClass">
		<div class="row padding-0 text-center">
			<div class="col col-15">
				<i class="ion ion-image royal" on-tap="doShowFile()"></i>
        		<input id="dialog-upfilebutton" type="file" multiple="multiple" accept="image/*" onchange="angular.element(this).scope().onupload(this)" style="display: none;" />
			</div>
			<div class="col col-15">
				<i class="ion ion-ios-plus-outline positive" on-tap="openMore()"></i>
			</div>
			<div class="col col-67">&nbsp;</div>
		</div>
	    <ion-slide-box on-slide-changed="slideHasChanged($index)" pager-click="slideHasChanged()" delegate-handle="image-viewer" style="border-top:1px solid #DDDDDD;">
            <ion-slide ng-repeat="emoji_list in emoji_map" style="height: 250px;">
                <ion-scroll zooming="false" direction="y" style="height: 230px;">
                    <span class="emoji" ng-repeat="eitem in emoji_list" on-tap="tapEmoji(eitem.unicode)"  ng-bind-html="eitem.imgsrc"></span>
                </ion-scroll>
            </ion-slide>
        </ion-slide-box>
	</div>
	
	<!--输入-->
	<div class="bar bar-footer" keyboard-attach>
		<div class="row padding-0">
			<div class="col col-90 font-large-my padding-0">
				<!--<div style="height:32px;overflow: scroll;margin-right: 5px;-webkit-user-select:text;" 
					class="stable-bg border-radius-my bian_gray emoji" 
					placeholder="请输入聊天内容..." id="html_msg" 
					contenteditable="true" 
					ng-bind-html="input.message"></div>-->
			    <!--<div id="html_msg" class="stable-bg border-radius-my bian_gray emoji" contenteditable="true" data-text="请输入聊天内容" ng-bind-html="input.message"></div>-->
			    <textarea id="html_msg" class="stable-bg border-radius-my bian_gray emoji" placeholder="请输入聊天内容" ng-model="input.message"></textarea>
			</div>
			<div class="col col-10 positive-bg padding-0 text-center light font-middle-my border-radius-my" style="line-height: 34px;" on-tap="send_message()">
				发送
			</div>
		</div>
	</div>
</ion-view>